package com.springboot.jktj.service.impl;

import java.util.List;
import com.springboot.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.springboot.jktj.mapper.JktjDepartmentMapper;
import com.springboot.jktj.domain.JktjDepartment;
import com.springboot.jktj.service.IJktjDepartmentService;

/**
 * 科室管理Service业务层处理
 * 
 * @author springboot
 * @date 2023-11-26
 */
@Service
public class JktjDepartmentServiceImpl implements IJktjDepartmentService 
{
    @Autowired
    private JktjDepartmentMapper jktjDepartmentMapper;

    /**
     * 查询科室管理
     * 
     * @param depId 科室管理主键
     * @return 科室管理
     */
    @Override
    public JktjDepartment selectJktjDepartmentByDepId(Long depId)
    {
        return jktjDepartmentMapper.selectJktjDepartmentByDepId(depId);
    }

    /**
     * 查询科室管理列表
     * 
     * @param jktjDepartment 科室管理
     * @return 科室管理
     */
    @Override
    public List<JktjDepartment> selectJktjDepartmentList(JktjDepartment jktjDepartment)
    {
        return jktjDepartmentMapper.selectJktjDepartmentList(jktjDepartment);
    }

    /**
     * 新增科室管理
     * 
     * @param jktjDepartment 科室管理
     * @return 结果
     */
    @Override
    public int insertJktjDepartment(JktjDepartment jktjDepartment)
    {
        jktjDepartment.setCreateTime(DateUtils.getNowDate());
        return jktjDepartmentMapper.insertJktjDepartment(jktjDepartment);
    }

    /**
     * 修改科室管理
     * 
     * @param jktjDepartment 科室管理
     * @return 结果
     */
    @Override
    public int updateJktjDepartment(JktjDepartment jktjDepartment)
    {
        jktjDepartment.setUpdateTime(DateUtils.getNowDate());
        return jktjDepartmentMapper.updateJktjDepartment(jktjDepartment);
    }

    /**
     * 批量删除科室管理
     * 
     * @param depIds 需要删除的科室管理主键
     * @return 结果
     */
    @Override
    public int deleteJktjDepartmentByDepIds(Long[] depIds)
    {
        return jktjDepartmentMapper.deleteJktjDepartmentByDepIds(depIds);
    }

    /**
     * 删除科室管理信息
     * 
     * @param depId 科室管理主键
     * @return 结果
     */
    @Override
    public int deleteJktjDepartmentByDepId(Long depId)
    {
        return jktjDepartmentMapper.deleteJktjDepartmentByDepId(depId);
    }
}
